package top.my;

public class Const {
    public static final int PAGE_SIZE = 10;//每页条数
    //返回值字段
    public static final String CODE = "code";
    public static final String MSG = "msg";
    public static final String DATA = "data";
    public static final String RESULT = "result";
    //数据库字段
    public static final String DB_USER = "user";

    //用户信息字段
    public static class USER {
        public static final String UID = "uid";
        public static final String USERNAME = "username";
        public static final String PASSWORD = "password";
        public static final String XID = "xid";
        public static final String TOKEN = "token";
        public static final String NAME = "name";
        public static final String MSG = "msg";
        public static final String HEAD = "head";
        public static final String CREATETIME = "createtime";
        public static final String UPDATETIME = "updatetime";
    }


    //错误码
    public static final int REP_SUCCESS = 200; //成功
    public static final int REP_FAIL = -1; //失败
    public static final int REP_ERROR = -2; //错误
    public static final int REP_FAIL_NONE = -3; //不存在
    public static final int REP_FAIL_REQUEST = -4; //请求异常
    public static final int REP_INVALID_TOKEN = -6; //无效token

    //API
    public static final String API_LOGIN = "/api/login";//登录
    public static final String API_REGISTER = "/api/register";//注册
    public static final String API_UPDATE_XID = "/api/updateXid";//修改第三方id
    public static final String API_UPDATE_PASSWORD = "/api/updatePassword";//修改密码
    public static final String API_GET_INFO_BY_TOKEN = "/api/getInfo";//token获取用户信息
    public static final String API_GET_INFO_BY_ID = "/api/getInfoById";//uid获取用户信息
    public static final String API_UPDATE_INFO = "/api/updateInfo";//修改用户信息
    public static final String API_UNREGISTER = "/api/deleteInfo";//删除用户信息

}
